package com.louis.util;

import java.net.InetAddress;
import java.net.UnknownHostException;

public final class InetAddressUtil {

	private InetAddressUtil() {
	}

	/**
	 * 获取本地IP地址
	 * 
	 * @return
	 */
	public static String getLocalHostAddress() {
		String address = "127.0.0.1";
		try {
			address = InetAddress.getLocalHost().getHostAddress();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}
		return address;
	}

}
